× Lesson 1 Lesson 2 Lesson 3 Lesson 4 Lesson 5 Lesson 6 Lesson 7 Lesson 8 Lesson 9 Lesson 10 Lesson 11 Lesson 12 Lesson 13 Lesson 14 Lesson 15 Lesson 16

All lessons

Lesson 6 - Lists

Lists are a way to store multiple data values, such as ints, strings, and floats discussed in Lesson 4.

The basic structure for a list is:

a_list = [a, b, c]

Where a, b, and c are all data types, and they can be any data type and can store as many values as you want!

data = [12, 'twelve', 12.0]

Similiar to booleans, lists will become very useful later on in this course, but for now it is up to you to experiment with lists

You can try setting a variable equal to a list containing the numbers 0-10, and then printing it out, or even printing out a list directly using print(), it is up to you!

Once you are done experimenting move on to the next lesson!